Message

constructor(@Nullable text: CharSequence, timestamp: Long, @Nullable person: Person)(source)

Creates a new Message with the given text, timestamp, and sender.

Parameters

text

A CharSequence to be displayed as the message content

timestamp

Time at which the message arrived in ms since Unix epoch

person

A Person whose getName value is used as the display name for the sender. This should be null for messages by the current user, in which case, the platform will insert getUserDisplayName. A Person's key should be consistent during re-posts of the notification.


constructor(@Nullable text: CharSequence, timestamp: Long, @Nullable sender: CharSequence)(source)

Deprecated

Use the alternative constructor instead.

Constructor

Parameters

text

A CharSequence to be displayed as the message content

timestamp

Time at which the message arrived in ms since Unix epoch

sender

A CharSequence to be used for displaying the name of the sender. Should be null for messages by the current user, in which case the platform will insert getUserDisplayName. Should be unique amongst all individuals in the conversation, and should be consistent during re-posts of the notification.